<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui-v2.5.4/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/public.css" media="all">
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <table class="layui-hide" id="verificationCode" lay-filter="verificationCode"></table>
    </div>
</div>
</body>
<script src="/lib/layui-v2.5.4/layui.js" charset="utf-8"></script>
<script th:inline="javascript">
    /*<![CDATA[*/
    layui.use(['table'], function () {
        var table = layui.table;
        // 表格
        table.render({
            elem: '#verificationCode',
            url: '/api/admin/users/captcha/list',
            page: true,
            cols: [
                [
                    {field: 'categoryName', title: '验证码类型', align: 'center', sort: true},
                    {field: 'content', title: '验证码', align: 'center'},
                    {field: 'mobile', title: '手机', align: 'center'},
                    {
                        field: 'result', title: '发送结果', align: 'center', templet: function (item) {
                        if (item.result) {
                            return "成功";
                        } else {
                            return "失败";
                        }
                    }
                    },
                    {
                        field: 'sentTime',
                        title: '发送时间',
                        align: 'center',
                        templet: '<div>{{layui.util.toDateString(d.sentTime, "yyyy-MM-dd HH:mm:ss")}}</div>'
                    }
                ]
            ]
        });
    });
    /*]]>*/
</script>
</html>